<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>校园运动会管理系统 - 系统状态</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            margin: 0;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: #333;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background: white;
            border-radius: 16px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            padding: 40px;
            backdrop-filter: blur(10px);
        }
        .header {
            text-align: center;
            margin-bottom: 40px;
        }
        .header h1 {
            color: #333;
            font-size: 32px;
            margin-bottom: 10px;
            background: linear-gradient(45deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .status-card {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 24px;
            border-left: 4px solid #28a745;
        }
        .status-card.warning {
            border-left-color: #ffc107;
        }
        .status-card.error {
            border-left-color: #dc3545;
        }
        .status-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 12px;
            color: #333;
        }
        .status-content {
            color: #666;
            line-height: 1.6;
        }
        .api-list {
            list-style: none;
            padding: 0;
        }
        .api-list li {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 12px;
            border-left: 3px solid #007bff;
        }
        .api-method {
            display: inline-block;
            background: #007bff;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
            margin-right: 12px;
        }
        .api-method.get { background: #28a745; }
        .api-method.post { background: #007bff; }
        .api-path {
            font-family: 'Monaco', 'Menlo', monospace;
            font-size: 14px;
            color: #333;
        }
        .test-accounts {
            background: #e9ecef;
            border-radius: 12px;
            padding: 24px;
            margin-top: 24px;
        }
        .account-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-top: 16px;
        }
        .account-item {
            background: white;
            border-radius: 8px;
            padding: 16px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        .account-role {
            font-weight: 600;
            color: #495057;
            margin-bottom: 8px;
        }
        .account-credentials {
            font-family: monospace;
            font-size: 14px;
            color: #6c757d;
        }
        .footer {
            text-align: center;
            margin-top: 40px;
            color: #6c757d;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>校园运动会管理系统</h1>
            <p style="color: #666; font-size: 18px;">系统状态与API接口文档</p>
        </div>

        <div class="status-card">
            <div class="status-title">✅ 系统状态</div>
            <div class="status-content">
                <p><strong>后端服务：</strong>运行正常 (端口: 8092)</p>
                <p><strong>数据库连接：</strong>已建立</p>
                <p><strong>Redis缓存：</strong>已连接</p>
                <p><strong>异常记录：</strong>已清理</p>
            </div>
        </div>

        <div class="status-card">
            <div class="status-title">🔧 修复内容</div>
            <div class="status-content">
                <p>✅ 修复了用户登录密码验证问题</p>
                <p>✅ 修复了异常通知服务的空指针异常</p>
                <p>✅ 修复了前端API导入错误</p>
                <p>✅ 添加了用户注册和密码重置功能</p>
                <p>✅ 清理了29个历史异常记录</p>
            </div>
        </div>

        <div class="status-card">
            <div class="status-title">🚀 API接口</div>
            <div class="status-content">
                <ul class="api-list">
                    <li>
                        <span class="api-method post">POST</span>
                        <span class="api-path">/api/auth/login</span> - 用户登录
                    </li>
                    <li>
                        <span class="api-method post">POST</span>
                        <span class="api-path">/api/auth/register</span> - 用户注册
                    </li>
                    <li>
                        <span class="api-method post">POST</span>
                        <span class="api-path">/api/auth/check-username</span> - 检查用户名
                    </li>
                    <li>
                        <span class="api-method post">POST</span>
                        <span class="api-path">/api/auth/verify-security-question</span> - 验证安全问题
                    </li>
                    <li>
                        <span class="api-method post">POST</span>
                        <span class="api-path">/api/auth/reset-password</span> - 重置密码
                    </li>
                    <li>
                        <span class="api-method get">GET</span>
                        <span class="api-path">/api/exception-management/statistics</span> - 异常统计
                    </li>
                    <li>
                        <span class="api-method get">GET</span>
                        <span class="api-path">/api/exception-management/health</span> - 系统健康检查
                    </li>
                </ul>
            </div>
        </div>

        <div class="test-accounts">
            <div class="status-title">👤 测试账号</div>
            <div class="account-grid">
                <div class="account-item">
                    <div class="account-role">👨‍💼 管理员</div>
                    <div class="account-credentials">用户名: admin<br>密码: 123456</div>
                </div>
                <div class="account-item">
                    <div class="account-role">👨‍🏫 老师</div>
                    <div class="account-credentials">用户名: teacher1<br>密码: 123456</div>
                </div>
                <div class="account-item">
                    <div class="account-role">👨‍🎓 学生</div>
                    <div class="account-credentials">用户名: student1<br>密码: 123456</div>
                </div>
                <div class="account-item">
                    <div class="account-role">🏃 裁判</div>
                    <div class="account-credentials">用户名: referee1<br>密码: 123456</div>
                </div>
            </div>
            <p style="margin-top: 16px; color: #6c757d; font-size: 14px;">
                <strong>安全问题答案：</strong><br>
                admin: "校园运动会" | teacher1: "教学楼" | student1: "图书馆"<br>
                student2: "篮球场" | referee1: "操场" | volunteer1: "体育馆"
            </p>
        </div>

        <div class="footer">
            <p>校园运动会管理系统 v1.0.0</p>
            <p>系统运行时间：<span id="runtime"></span></p>
        </div>
    </div>

    <script>
        // 显示系统运行时间
        const startTime = new Date();
        function updateRuntime() {
            const now = new Date();
            const diff = Math.floor((now - startTime) / 1000);
            const hours = Math.floor(diff / 3600);
            const minutes = Math.floor((diff % 3600) / 60);
            const seconds = diff % 60;

            document.getElementById('runtime').textContent =
                `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
        }

        setInterval(updateRuntime, 1000);
        updateRuntime();
    </script>
</body>
</html>